using System;
using WCell.Constants.Spells;
using WCell.RealmServer.Entities;
using WCell.RealmServer.Spells;

namespace WCell.RealmServer.Misc
{
	public interface IProcHandler : IDisposable
	{
		ProcTriggerFlags ProcTriggerFlags
		{
			get;
		}

		uint ProcChance { get; }

		/// <summary>
		/// The Spell to be triggered (if any)
		/// </summary>
		Spell ProcSpell { get; }

		int RemainingCharges
		{
			get;
		}

		/// <summary>
		/// Whether this handler can trigger the given Proc
		/// </summary>
		/// <param name="target"></param>
		/// <param name="action"></param>
		/// <returns></returns>
		bool CanBeTriggeredBy(Unit target, IUnitAction action);

		void TriggerProc(Unit target, IUnitAction action);
	}
}
